/*
 * @Description: 新增流程弹窗
 * @Author: Rfan
 * @Date: 2022-12-11 12:29:13
 * @LastEditTime: 2022-12-11 16:52:05
 */

import { useEffect } from 'react';
import { Button, Form, Modal, Table } from 'antd';
import { useFlowMgtContext } from '@/view/sysMaintenance/FlowMgt/contexts/FlowMgtContext';
import FlowForm from './common/FlowForm';
import type { ICommonDialog } from '@/interfaces/global';
import type { IAddFlowItemParams } from '@/api/workFlow/mgt';

interface IInstanceMgtDialogProps extends ICommonDialog {}

const InstanceMgtDialog = (props: IInstanceMgtDialogProps) => {
  const { visible, onClose } = props;

  useEffect(() => {
    if (visible) {
      //
    }
  }, [visible]);

  const onCancel = () => {
    onClose();
  };

  return (
    <Modal
      destroyOnClose
      title="新建流程"
      visible={visible}
      width={600}
      onCancel={onCancel}
      footer={[
        <Button key="back" onClick={onCancel}>
          取消
        </Button>,
        <Button key="submit" type="primary" onClick={onCancel}>
          保存
        </Button>
      ]}
    >
      <Table />
    </Modal>
  );
};

export default InstanceMgtDialog;
